#include "Headers.h"

int main()
{
    HANDLE port;
    char writeBuffer[bufferSize];
    char readBuffer[bufferSize];
    OVERLAPPED portOverlapped;

    connectSerialPort(&port);
    portOverlapped.hEvent = 0;
    std::cin.getline(writeBuffer, bufferSize);
    do{
        CommWrite(port, writeBuffer,&portOverlapped);
        CommRead(port, readBuffer,&portOverlapped);
    }while(strcmp(writeBuffer,"exit(0)"));
    CloseHandle(port);
    return 0;
}